#-------------------------------------------------
#
# Project created by QtCreator 2024-03-12T14:21:27
#
#-------------------------------------------------

QT       += core gui sql

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TEMPLATE = app
NAMEPK= PK IRSI RRV
TARGET= viewsignal
NAMEPROGRU= Визуализатор viewsignal
COMMENTRU= Программа представления сигнальной информации в режиме реального времени
NAMEDEB= viewsignal
VERSION= 1.0

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
TRANSLATIONS = viewsignal_ru.ts \
               viewsignal_en.ts

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

INCLUDEPATH += /usr/include/qwt


QWT_ROOT = $${PWD}/..


QWT_OUT_ROOT = $${OUT_PWD}/../..

defineTest(qwtAddLibrary) {

    LIB_PATH = $$1
    LIB_NAME = $$2

    mac:contains(QWT_CONFIG, QwtFramework) {

        LIBS      *= -F$${LIB_PATH}
    }
    else {

        unix:lessThan(QT_MAJOR_VERSION, 5) {

            # Many Linux distributions install Qwt in the same directory
            # as the Qt libs and thus we need to prepend the path for the local build
            # to avoid conflicting with the installed version.
            # Qt5 qmake appends ( instead of prepending ) the path to the Qt libs
            # to LIBS, but for Qt4 we need to use the QMAKE_LIBDIR_FLAGS.

            QMAKE_LIBDIR_FLAGS *= -L$${LIB_PATH}
        }
        else {
            LIBS *= -L$${LIB_PATH}
        }
    }

    unset(LINKAGE)

    mac:contains(QWT_CONFIG, QwtFramework) {

        LINKAGE = -framework $${LIB_NAME}
    }

    isEmpty(LINKAGE) {

        if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {

            mac:LINKAGE = -l$${LIB_NAME}_debug
            win32:LINKAGE = -l$${LIB_NAME}d
        }
    }

    isEmpty(LINKAGE) {

        LINKAGE = -l$${LIB_NAME}
    }

    !isEmpty(QMAKE_LSB) {

        QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}
    }

    LIBS += $$LINKAGE
    export(LIBS)
    export(QMAKE_LFLAGS)
    export(QMAKE_LIBDIR_FLAGS)

    return(true)
}




greaterThan(QT_MAJOR_VERSION, 4) {
    qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt-qt5)
} else {
    qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
}
unix {
    QWT_INSTALL_PREFIX    = $$[QT_INSTALL_PREFIX]
}

QWT_INSTALL_LIBS      = $${QWT_INSTALL_PREFIX}/lib


SOURCES += \
    form.cpp \
        main.cpp \
        mainwindow.cpp \
    samplingthread.cpp \
    signaldata.cpp \
    privatedata.cpp \
    curvedata.cpp \
    plot.cpp \
    colorplot.cpp \
    isi.cpp \
    binaryscaledraw.cpp

HEADERS += \
    form.h \
        mainwindow.h \
    samplingthread.h \
    signaldata.h \
    privatedata.h \
    curvedata.h \
    plot.h \
    colorplot.h \
    isi.h \
    globalvar.h \
    binaryscaledraw.h

FORMS += \
        form.ui \
        mainwindow.ui

RESOURCES += \
    viewsignal.qrc
